package com.xiaocg.adapter.objectpack;

import com.xiaocg.adapter.classpack.SdCard;
import com.xiaocg.adapter.classpack.TfCard;

/**
 * 对象适配器模式
 */
public class SdCardObjectAdapter implements SdCard {

    private TfCard tfCard;

    public void setTfCard(TfCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSd() {
        return tfCard.readTf();
    }

    @Override
    public void writeSd(String s) {
        tfCard.writeTf(s);
    }
}
